<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		.son{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
		}
	</style>

	<script type="text/javascript">

		window.onload = function  () {
			
			son = document.getElementsByClassName('son');

			son[0].onmouseover = function  () {
				son[0].style.width="300px";
			}

			son[0].onmouseout = function  () {
				son[0].style.width="200px";
			}

			input  = document.getElementById('input');

			input.onfocus =  function  () {
				input.style.border="1px solid red";
				input.style.outline="0px";
			}

			input.onblur =  function  () {
				input.style.border="1px solid #ccc";
				input.style.outline="0px";
			}

		}

	</script>
</head>
<body>
	<div class="son">
		


	</div>
	<input type="text" id="input">
</body>
</html>